#pragma once
#include <Windows.h>
#include <string>
#include <vector>

namespace Utils
{
    std::wstring A2WS(const std::string& str);
    std::wstring A2UC(const std::string& in_str);
    std::string WS2A(const std::wstring& wstr);
    std::string UC2A(const std::wstring& in_str);
    std::vector<std::string> Split(std::string str, std::string pattern);
    std::string& ReplaceAWithX(std::string& str, std::string spl, std::string dest);
    std::string& Trim(std::string& s, std::string Split = " ");
    std::string ByteToString(const char* s, size_t size);
    std::string GetAppPath();
    template <typename... Args>
    std::string Format(const char* Format, Args... args)
    {
        size_t size = snprintf(nullptr, 0, Format, args...) + 1;
        std::string _Str(size, '\0');
        _Str.resize(snprintf(&_Str[0], size, Format, args...));

        return _Str;
    }
};